package com.xie.mapper;

import com.xie.pojo.BaiduWap;
import com.xie.pojo.BaiduWapTj;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface BaiduWapTjMapper extends Mapper<BaiduWapTj> {

    @Select("select a.*,b.name from zy_tj a left join user b on a.uid=b.id")
    @Results({
            @Result(id = true,property = "id",column = "id"),
            @Result(property = "zyname",column = "zyname"),
            @Result(property = "zyurl",column = "zyurl"),
            @Result(property = "zypassword",column = "zypassword"),
            @Result(property = "uid",column = "uid"),
            @Result(property = "type",column = "type"),
            @Result(property = "uname",column = "name"),
    })
    List<BaiduWapTj> findAllByTjUser();
}
